<template>
<div class="header">
  <div class="header-left">
    <span class="iconfont">&#xe61e;</span>
  </div>
  <div class="header-input">
    <span class="iconfont">&#xe637;</span>
    输入城市/景点/游玩主题
    </div>
  <router-link to="/city">
  <div class="header-right">
    {{this.city}}
    <span class="iconfont">&#xe614;</span>
  </div>
  </router-link>
</div>
</template>

<script>
import { mapState } from 'vuex';

export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city']),
  },
};
</script>

<style lang="stylus" scoped>
  @import '~style/varibles.styl'
  .header
    display: flex
    height: $headerHeight
    line-height : $headerHeight
    background: $bgColor
    color: #fff
    font-size: 4vw
    .header-left
      width: 6vw
      float: left
      text-align : center
    .header-input
      flex: 1
      margin-top : 2vw
      margin-left: 2vw
      padding-left: 2vw
      height : 8vw
      line-height: 8vw
      background: #fff
      border-radius : .7vw
      color: #ccc
    .header-right
      min-width: 16vw
      float: right
      text-align: center
      color: #fff
      padding: 0 1vw
</style>
